riscv: Return to previous privilege level after trap handling
authorBin Meng <[email protected]>
Wed, 12 Dec 2018 14:12:43 +0000 (06:12 -0800)
committerAndes <[email protected]>
Tue, 18 Dec 2018 01:56:27 +0000 (09:56 +0800)
commit10753ef8fd14dfe1d41ec253966569de19463adc
tree172dde763aa535bab9a515bcb90de35da1196e57
parent496262cca63f25408c6715b39cea1747e8ce9b59
riscv: Return to previous privilege level after trap handling

At present the trap handler returns to hardcoded M-mode/S-mode.
Change to returning to previous privilege level instead.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Lukas Auer <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
arch/riscv/cpu/mtrap.S